#!/bin/bash


if [ $# -ne 8 ]
then
	echo "Error: incorrect number of arguments."
	echo "Usage: convert-format.sh in_file in_tree_type in_tree_format in_file_format out_file out_tree_type out_tree_format out_file_format"
	exit
fi


script_dir=$(dirname $0)
dist=$script_dir/../bin
pkg=edu.washington.ling.syntric.proc
jar_dir=$script_dir/../jars
latex_dir=$script_dir/../latex

in_file=$1
in_tree_type=$2
in_tree_format=$3
in_file_format=$4
out_file=$5
out_tree_type=$6
out_tree_format=$7
out_file_format=$8

echo %%
echo %% Converting Format
echo %%

java -cp $dist:$jar_dir/* $pkg.ConvertFormat $in_file $out_file --0s $in_tree_type --0t $in_tree_format --0f $in_file_format --1s $out_tree_type --1t $out_tree_format --1f $out_file_format
